<!--
  ~ Copyright (C) 2019 by CS ROMANIA
  ~
  ~ This program is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU General Public License as published by the Free
  ~ Software Foundation; either version 3 of the License, or (at your option)
  ~ any later version.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  ~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along
  ~ with this program; if not, see http://www.gnu.org/licenses/
  -->

<html>
	<head>
		<title>SNAP Remote Execution Processor</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<link rel="stylesheet" href="style.css">
	</head>

	<body>
		<table class="header">
			<tr class="header">
				<td class="header">&nbsp;
					Remote Execution Processor</td>
				<td class="header" align="right"><a href="nbdocs://org.esa.snap.snap.help/org/esa/snap/snap/help/docs/general/overview/SnapOverview.html"><img src="images/snap_header.jpg" border=0></a></td>
			</tr>
		</table>

		<p><br/></p>
		<p>
			The Remote Execution Processor is a multi-steps iterative process that executes on the remote machines a slave graph and then on the host machine it executes a master graph using the products created by the remote machines.
			
			The overall principle of the algorithm is to distribute processing and reduce the time when running a graph.	
		</p>
		<p>
			The two major steps are:
		</p>
		<p>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			(i) execute products using a graph on the remote machines by means of the GPT application
		</p>
		<p>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			(ii) use the output products obtained in the previous step together with a another graph to create the final product.
		</p>
		<p>
			The products executed on the remote machines must be placed into a shared folder. Each remote machine must have installed a SSH server and the GPT application. When running a graph on a remote machine, the output product is placed in the same shared folder.
		</p>

		<h4>Remote execution dialog</h4>
		<p>
			The remote execution dialog is placed in the Tools menu and contains the properties used to execute the processor.
		</p>
		<table border="0">
			<tr>
				<td style="border-width:0;" valign="top">
					<h5>Remote execution</h5>

					<p>
						The section contains the properties used to access a machine by means of the SSH protocol and process a slave graph using the GPT application installed on that machine.
					</p>
					
					<p class="i1">
						<b>Remote shared folder path</b>
						Specify the shared folder containing the source products used to process the slave graph on the remote machines. After processing the slave graph on a remote machine the output product is placed in this folder.
					</p>			
					<p class="i1">
						<b>Remote username</b>
						Specify the username to connect to the remote shared folder.				
					</p>			
					<p class="i1">
						<b>Remote password</b>
						Specify the password to connect to the remote shared folder.				
					</p>			
					<p class="i1">
						<b>Local shared drive</b>
						Specify the folder on the host machine used to connect to the remote shared folder in order to select the source product to process the slave graph on the remote machines. The property is optional if the processor is running on a machine with Windows operating system.
                        <br />
						<b>NOTE:</b> If the local shared folder resides on a machine which operating system is Unix, then specify the local shared folder path.
					</p>
					<p class="i1">
						<b>Remote machines</b>
						Specify the remote machines used to process the slave graph.
					</p>

					<br />
					
					<h5>Input</h5>

					<p>
						The section contains the slave graph and the source products to be executed on the selected remote machines.
					</p>

					<p class="i1">
						<b>Slave graph file path</b>
						Specify the graph file to be processed on the selected remote machines.
					</p>			

					<p class="i1">
						<b>Source products</b>
						Specify the products to be processed by the slave graph on the selected remote machines.
					</p>

					<p class="i1">
						<b>Save slave products as</b>
						Specify the type of the output products created on the remote machines.
					</p>

					<br />
					
					<h5>Output</h5>
					
					<p>
						The section contains the properties of the output product created by means of the master graph.
					</p>
					
					<p class="i1">
						<b>Save as</b>
						Used to specify whether the target product should be saved to the file system. The combo box presents a list of file formats, currently BEAM-DIMAP, GeoTIFF, and HDF5.
					</p>

					<p class="i1">
						<b>Master graph file path</b>
						Specify the graph file to be processed on the host machine having as source products the created products by the slave graph.
					</p>

					<p class="i1">
						<b>Name</b>
						Used to specify the name of the target product.
					</p>

					<p class="i1">
						<b>Directory</b>
						Specify the folder path of the target product.
					</p>
					
					<p class="i1">
						<b>Open in application</b>
						Used to specify whether the target product should be opened in the SNAP application.
					</p>

					<br />

					<p>
						<b>NOTE:</b> The slave and master graphs must contain at least one read node and only one write node.
						The number of selected source products to be processed on the remote machines must be multiple of the number of read nodes from the slave graph file.				
						When the master graph file is specified the number of its read nodes must be equal with the number of the output products created by the remote machines.
					</p>
				</td>		
				<td style="border-width:0;" valign="top">
					<img src="images/remote-execution.png">
				</td>
			</tr>
		</table>

		<h4>Remote machine dialog</h4>

		<p>
			The remote machine dialog contains the properties used to access a machine by means of the SSH protocol. The dialog window can be accessed by means of the add/edit buttons from the remote execution dialog.
			Later, this machine is used for processing a slave graph using the GPT installed on this machine.
		</p>

		<table border="0">
			<tr>
				<td style="border-width:0;" valign="top">
					<p class="i1">
						<b>Host name</b>
						Specify the machine name or its IP address.
					</p>

					<p class="i1">
						<b>Port number</b>
						Specify the port number to connect to the SSH server.
					</p>

					<p class="i1">
						<b>Operating system</b>
						Specify the operating system of the remote machine.
					</p>

					<p class="i1">
						<b>Username</b>
						Specify the username to connect to the remote machine.
					</p>
					<p class="i1">
						<b>Password</b>
						Specify the password to connect to the remote machine.
					</p>
					<p class="i1">
						<b>GPT file path</b>
						Specify the path of the 'gpt' executable to start the GPT application. If the property is not specified then the 'PATH' environment variable is used to find the GPT executable.
					</p>
					<p class="i1">
						<b>Shared drive</b>
						Specify the drive of the machine used to connect to the remote shared folder in order to access the source products of the slave graph.
						<br />
						<b>NOTE:</b> If the remote machine operating system is Unix, then specify the folder path of the machine used to connect to the remote shared folder.

					</p>
					<p class="i1">
						<b>Test connection</b>
						Allow the user to test the SSH connection to the defined remote machine.
					</p>
				</td>
				<td style="border-width:0;" valign="top">
					<img src="images/remote-machine.png">
				</td>
			</tr>
		</table>

		<hr>
		
	</body>
</html>
